package lvbu.wang.lvbuoperator.function.nologin;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.qing.library.services.ListenerNetStateService;

import lvbu.wang.lvbuoperator.R;
import lvbu.wang.lvbuoperator.constants.ConstantsValue;
import lvbu.wang.lvbuoperator.core.BaseActivity;
import lvbu.wang.lvbuoperator.services.BluetoothLEService;

public class NoLoginOperationEntryActivity extends BaseActivity implements View.OnClickListener {

    private Button mBtnNoLoginOperation;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_no_login_operation_entry);
        setTitle("LVBU");
        startService(new Intent(this, BluetoothLEService.class));
        startService(new Intent(this, ListenerNetStateService.class));
    }

    @Override
    protected void init() {
        mBtnNoLoginOperation = findView(R.id.btn_noLoginOperation);
        mBtnNoLoginOperation.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_noLoginOperation:
                noLoginOperation();//非登录操作
                break;
        }
    }

    /**
     * 非登录操作
     */
    private void noLoginOperation(){

        Intent intent = new Intent(NoLoginOperationEntryActivity.this,NoLoginOperationBluetoothListActivity.class);
        intent.putExtra(ConstantsValue.OPERATION_TYPE,ConstantsValue.OPERATION_TYPE_NO_LOGIN);
        BaseActivity.setMotorType(this,ConstantsValue.MOTOR_TYPE_BLE_OPERATION);
        startActivity(intent);
    }
}
